#line 1 "C:/Users/Maxime/Documents/Progc/18f2520/testlcd/testlcd.c"
#line 20 "C:/Users/Maxime/Documents/Progc/18f2520/testlcd/testlcd.c"
sbit LCD_RS at RB3_bit;
sbit LCD_EN at RB1_bit;
sbit LCD_D7 at RB7_bit;
sbit LCD_D6 at RB6_bit;
sbit LCD_D5 at RB5_bit;
sbit LCD_D4 at RB4_bit;
#line 35 "C:/Users/Maxime/Documents/Progc/18f2520/testlcd/testlcd.c"
sbit LCD_RS_Direction at TRISB3_bit;
sbit LCD_EN_Direction at TRISB1_bit;
sbit LCD_D7_Direction at TRISB7_bit;
sbit LCD_D6_Direction at TRISB6_bit;
sbit LCD_D5_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB4_bit;

char txt1[] = "mikroElektronika";
char txt2[] = "EasyPIC6";
char txt3[] = "Lcd4bit";
char txt4[] = "example";

char i;

void Move_Delay() {
 Delay_ms(500);
}

void main(){

 TRISA=0b00000000;
 PORTA=0b00000000;

 TRISB=0b00000000;
 PORTB=0b00000000;

 TRISC=0b00001111;
 PORTC=0b00001111;
#line 70 "C:/Users/Maxime/Documents/Progc/18f2520/testlcd/testlcd.c"
 Delay_ms(500);


 Lcd_Init();

 Delay_ms(500);


 Lcd_Cmd(_LCD_CLEAR);

 Lcd_Out(1,6,txt3);


 Lcd_Out(2,6,txt4);

 Delay_ms(2000);


 Lcd_Cmd(_LCD_CLEAR);

 Lcd_Out(1,1,txt1);
 Lcd_Out(2,5,txt2);

 Delay_ms(2000);



 for(i=0; i<4; i++) {
 Lcd_Cmd(_LCD_SHIFT_RIGHT);

 Move_Delay();
 }


 while(1) {
 for(i=0; i<8; i++) {
 Lcd_Cmd(_LCD_SHIFT_LEFT);

 Move_Delay();
 }


 for(i=0; i<8; i++) {
 Lcd_Cmd(_LCD_SHIFT_RIGHT);

 Move_Delay();
 }

 }
}
